<!-- 导航条显示隐藏-->
var xml1;
var obj;
function is_on_show(obj,id)
{
	//alert(id);
	//alert(obj.src);
	//var obj=document.getElementById("onsale")
    var val=(obj.src.match(/yes.gif/i))?0:1;
    //alert(val);
    xml1=new ActiveXObject("Msxml2.xmlhttp.3.0");
	xml1.open("GET","ajax/onshow.php?val="+val+ "&id=" +id,true);
	xml1.onreadystatechange=callback;
	xml1.send(null);
	
	function callback()
	{
		if(xml1.readystate==4)
        {
			var result=xml1.responseText;
			//alert(result);
			//alert(obj.src);
			obj.src = (result > 0) ? 'image/yes.gif' : 'image/no.gif';
        }
    }
}


<!-- 导航条下的二级分类显示隐藏-->
var xml2;
var obj1;
function is_gtype_show(obj1,id)
{
	//alert(id);
	//alert(obj.src);
    var val1=(obj1.src.match(/yes.gif/i))?0:1;
    //alert(val1);
    xml2=new ActiveXObject("Msxml2.xmlhttp.3.0");
	xml2.open("GET","ajax/onshowgtype.php?val="+val1+ "&id="+id,true);
	xml2.onreadystatechange=callback;
	xml2.send(null);
	
	function callback()
	{
		if(xml2.readystate==4)
        {
			var result=xml2.responseText;
			//alert(result);
			//alert(obj.src);
			obj1.src = (result > 0) ? 'image/yes.gif' : 'image/no.gif';
        }
    }
}
<!-- 导航条下的三级分类显示隐藏-->
var xml3;
var obj3;
function is_ptype_show(obj3,id)
{
	//alert(id);
	//alert(obj.src);
    var val3=(obj3.src.match(/yes.gif/i))?0:1;
    //alert(val1);
    xml3=new ActiveXObject("Msxml2.xmlhttp.3.0");
	xml3.open("GET","ajax/onshowptype.php?val="+val3+ "&id="+id,true);
	xml3.onreadystatechange=callback;
	xml3.send(null);
	
	function callback()
	{
		if(xml3.readystate==4)
        {
			var result=xml3.responseText;
			//alert(result);
			//alert(obj.src);
			obj3.src = (result > 0) ? 'image/yes.gif' : 'image/no.gif';
        }
    }
}
